import bar from "./bar"

export default class part {
    type: 'default' | 'list'  = 'default'
    title: string = ''
    bars: bar[] = []
    listOrder?: string = ''
}

export function simplePart(bars: bar[], title: string) {
    let p = new part()
    p.type = 'default'
    p.bars = bars
    p.title = title
    return p
}

export function simpleListPart(bars: bar[], title: string, order: string) {
    let p = new part()
    p.type = 'list'
    p.bars = bars
    p.title = title
    p.listOrder = order
    return p
}
